//
//  wiimuSSDP.h
//  testUPNP
//
//  Created by 赵帅 on 14-1-6.
//  Copyright (c) 2014年 umbrella. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Reachability.h"

@protocol WiimuUpnpDelegate <NSObject>

-(void)newDeviceCome:(NSDictionary *)device;
-(void)deviceInfoChange:(NSDictionary *)device;
-(void)deviceDisappear:(NSDictionary *)device;
-(void)allDevicesDisappear;

-(void)netWorkStatusChanged:(Reachability*) curReach;

@end

typedef enum
{
    devLinkPlay,
    devWifiAudio
}enumDeviceType;

@interface WiimuUpnp : NSObject

+(WiimuUpnp*)sharedInstance;

//@property (retain) NSObject<WiimuUpnpDelegate> * delegate;

@property (retain) NSMutableArray * delegates;
@property (nonatomic,strong) Reachability *wifiReach;

-(void)addDelegate:(NSObject<WiimuUpnpDelegate> *)delegate;

-(void)beginSSDP:(enumDeviceType)type;
-(void)stopSSDP;
-(void)refresh;

-(void)mirrorTo:(NSString *)identifier generateUrl:(NSString *)mirrorUrl;
-(void)stopMirror:(NSString *)identifier;

@end
